-
Notifications
You must be signed in to change notification settings - Fork 513
WWSTCERT-8357/8360 Inovelli VZW32-SN: Adding support for this device for the WWST program #2371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
WWSTCERT-8357/8360 Inovelli VZW32-SN: Adding support for this device for the WWST program #2371
Conversation
…mware update process during certification
Duplicate profile check: Passed - no duplicate profiles detected. |
Invitation URL: |
Test Results 71 files 455 suites 0s ⏱️ Results for commit 554b18c. ♻️ This comment has been updated with latest results. |
Minimum allowed coverage is Generated by 🐒 cobertura-action against 554b18c |
- id: colorTemperature | ||
version: 1 | ||
config: | ||
values: | ||
- key: "colorTemperature.value" | ||
range: [ 2700, 6500 ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can now simply define the range your bulb supports in code using the colorTemperatureRange
attribute.
- id: firmwareUpdate | ||
version: 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you're not emitting any events using this capability, please omit it.
If we do add OTA support for z-wave in the future, we will handle adding it to device profiles as necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add a copyright and license statement on all lua files:
-- Copyright 2025 SmartThings
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
local SwitchMultilevel = (require "st.zwave.CommandClass.SwitchMultilevel")({version=4}) | ||
local preferencesMap = require "preferences" | ||
--- @type st.zwave.CommandClass.Notification | ||
local Notification = (require "st.zwave.CommandClass.Notification")({ version = 3 }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused
[cc.CONFIGURATION] = { | ||
[Configuration.REPORT] = function() end -- Empty function since configuration_report was unused | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be omitted. The parent driver doesn't do any handling of this command either, so it's already a no-op.
local function basic_and_switch_binary_report_handler(driver, device, cmd) | ||
local value = cmd.args.target_value and cmd.args.target_value or cmd.args.value | ||
local event = value == SwitchBinary.value.OFF_DISABLE and capabilities.switch.switch.off() or capabilities.switch.switch.on() | ||
device:emit_event_for_endpoint(cmd.src_channel, event) | ||
end | ||
|
||
local function onoff_level_report_handler(self, device, cmd) | ||
local value = cmd.args.target_value and cmd.args.target_value or cmd.args.value | ||
device:emit_event(value == SwitchMultilevel.value.OFF_DISABLE and capabilities.switch.switch.off() or capabilities.switch.switch.on()) | ||
if value >= 0 then | ||
device:emit_event(capabilities.switchLevel.level(value >= 99 and 100 or value)) | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should already be handled by our defaults inherited from the parent driver, I expect.
if device.network_type ~= st_device.NETWORK_TYPE_CHILD then | ||
device:set_component_to_endpoint_fn(component_to_endpoint) | ||
device:set_endpoint_to_component_fn(endpoint_to_component) | ||
device:send(Version:Get({})) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this is just for logging purposes it should be removed
device:emit_event(capabilities.colorControl.hue(1)) | ||
device:emit_event(capabilities.colorControl.saturation(1)) | ||
device:emit_event(capabilities.colorTemperature.colorTemperature(6500)) | ||
device:emit_event(capabilities.switchLevel.level(100)) | ||
device:emit_event(capabilities.switch.switch("off")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is emitted every time the driver starts, e.g. when the hub restarts. I predict this would have some unintended consequences for users.
parameter158 = {parameter_number = 158, size = 1}, | ||
parameter22 = {parameter_number = 22, size = 1}, | ||
parameter52 = {parameter_number = 52, size = 1}, | ||
parameter1 = {parameter_number = 1, size = 1}, | ||
parameter2 = {parameter_number = 2, size = 1}, | ||
parameter3 = {parameter_number = 3, size = 1}, | ||
parameter4 = {parameter_number = 4, size = 1}, | ||
parameter9 = {parameter_number = 9, size = 1}, | ||
parameter10 = {parameter_number = 10, size = 1}, | ||
parameter15 = {parameter_number = 15, size = 1}, | ||
parameter18 = {parameter_number = 18, size = 1}, | ||
parameter19 = {parameter_number = 19, size = 2}, | ||
parameter20 = {parameter_number = 20, size = 2}, | ||
parameter50 = {parameter_number = 50, size = 1}, | ||
parameter95 = {parameter_number = 95, size = 1}, | ||
parameter96 = {parameter_number = 96, size = 1}, | ||
parameter97 = {parameter_number = 97, size = 1}, | ||
parameter98 = {parameter_number = 98, size = 1}, | ||
parameter101 = {parameter_number = 101, size = 2}, | ||
parameter102 = {parameter_number = 102, size = 2}, | ||
parameter103 = {parameter_number = 103, size = 2}, | ||
parameter104 = {parameter_number = 104, size = 2}, | ||
parameter105 = {parameter_number = 105, size = 2}, | ||
parameter106 = {parameter_number = 106, size = 2}, | ||
parameter108 = {parameter_number = 108, size = 4}, | ||
parameter110 = {parameter_number = 110, size = 2}, | ||
parameter111 = {parameter_number = 111, size = 1}, | ||
parameter112 = {parameter_number = 112, size = 1}, | ||
parameter113 = {parameter_number = 113, size = 1}, | ||
parameter114 = {parameter_number = 114, size = 4}, | ||
parameter117 = {parameter_number = 117, size = 1}, | ||
parameter118 = {parameter_number = 118, size = 2}, | ||
parameter119 = {parameter_number = 119, size = 2} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is more preferences than we typically allow. Please consider removing or consolidating some of these.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a significant number of unit tests. We like our unit test code coverage to be >90%. Yours is currently at 32%.
Check all that apply
Type of Change
Checklist
Description of Change
Summary of Completed Tests